import request from '@/utils/request';
import type { ResponseBaseData } from '@/api/model/baseModel';
const basePath = '/appsys/monitor';
export interface SysMonitorDto {
  logicalCpuNum?: string;
  vendorFreq?: string;
  free?: string;
  sys?: string;
  used?: string;
  total?: string;
  threshold?: string;
  usage?: number;
  name?: string;
  version?: string;
  startTime?: string;
  runTime?: string;
  home?: string;
  inputArgs?: any;
  computerName?: string;
  osName?: string;
  computerIp?: string;
  osArch?: string;
}

/** 获取服务器信息 */
export function getServerInfo(): Promise<ResponseBaseData<any>> {
  return request.get(`${basePath}/getServerInfo/v1`);
}

/** 获取刷新事件 */
export function getRefreshTime(): Promise<ResponseBaseData<any>> {
  return request.get(`${basePath}/getRefreshTime/v1`);
}
